const { Readable } = require('stream');

class MyReadable extends Readable {
    constructor(options) {
        super(options);
        this.data = 'abcdefghijklmnopqrstuvwxyz';
        this.currentChar = 0;
    }

    _read() {
        if (this.currentChar < this.data.length) {
            this.push(this.data[this.currentChar]);
            this.currentChar++;
        } else {
            this.push(null);
        }
    }
}

// 创建实例并输出到标准输出
const myReadable = new MyReadable();
myReadable.pipe(process.stdout);